﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="NewArticle.ascx.cs" Inherits="NewArticle" %>
<%@ Import Namespace="DTO" %>
<asp:DataList ID="dlstArticles" EnableTheming="False" runat="server" 
  DataSourceID="objAllArticles" DataKeyField="ID" Width="100%" RepeatColumns="1">
  <ItemTemplate>
     <table cellpadding="0" style="width: 100%;">
        <tr>
           <td valign="top"; style="width:10px;">
                <a href='<%#Globals.ApplicationPath%>thoi-trang/<%#Eval("ID")%>/<%#Utils.ConvertToUnSign(DataBinder.Eval(Container.DataItem, "Title").ToString())%>.aspx'/>
                    <asp:Image ID="Image1" ImageUrl="~/Images/dot.png" runat="server" />
                </a>
               </td>
           <td>
           <div style="color:Gray ">
                <a href='<%#Globals.ApplicationPath%>thoi-trang/<%#Eval("ID")%>/<%#Utils.ConvertToUnSign(DataBinder.Eval(Container.DataItem, "Title").ToString())%>.aspx'/>
                    <%#Eval("Title")%>
                </a>
                <asp:Label style="font-size:10px; color:Gray; " runat="server" ID="lblAddedDate" Text='<%# "[" + Eval("ReleaseDate", "{0:d}") + "]" %>' />            
                <asp:Image ID="Image2" ImageUrl="~/Images/imgNew.gif" runat="server" Visible='<%# Eval("IsNew") %>' /> 
            </div>
           </td>
        </tr>
     </table>
  </ItemTemplate>
</asp:DataList>
<asp:ObjectDataSource ID="objAllArticles" runat="server" SelectMethod="ListNewArticlesByArticleID"
  TypeName="BLL.Article.Article">
    <SelectParameters>
        <asp:QueryStringParameter Name="articleID" QueryStringField="ID" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>